package kr.hkit.androidcomplete02.ch03;

import kr.hkit.androidcomplete02.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ProgressBar;

public class ProgressBarTest extends Activity {

	ProgressBar mProgBar;
	ProgressBar mProgCircle;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.progressbartest);

		mProgBar = (ProgressBar) findViewById(R.id.progress);
		mProgCircle = (ProgressBar) findViewById(R.id.progcircle);
	}

	public void mOnClick(View v) {
		switch (v.getId()) {

		case R.id.decfirst:
			mProgBar.incrementProgressBy(-2);
			break;
		case R.id.incfirst:
			mProgBar.incrementProgressBy(2);
			break;
		case R.id.decsecond:
			mProgBar.incrementProgressBy(-2);
			break;
		case R.id.incsecond:
			mProgBar.incrementProgressBy(2);
			break;
		case R.id.start:
			mProgCircle.setVisibility(View.INVISIBLE);
			break;
		case R.id.stop:
			mProgCircle.setVisibility(View.INVISIBLE);
			break;

		}

	}
}
